﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluorineFx;
using System.ComponentModel;
using System.Data;
using System.Collections;
using WebKpiPage.Data.Sysmng;
using Model.Sysmng;

namespace RemoteFlunorineFx.Sysmng
{
    [RemotingService]
    [Description("SysmngQuery")]
    class SysmngQuery
    {
        #region 获取用户信息列表
        [DataTableType("")]
        public DataTable GetUserInfoList(int SearchType, string Content)
        {
            DataTable dt = SysmngDB.GetUserInfoList(SearchType,Content);
            return dt;
        }
        #endregion

        #region 加载用户详细信息界面信息
        [DataTableType("")]
        public ArrayList GetUserBaseInfo()
        {
            DataSet ds = SysmngDB.GetUserBaseInfo();
            ArrayList al = new ArrayList();
            al.Add(ds.Tables[0]);
            al.Add(ds.Tables[1]);
            al.Add(ds.Tables[2]);
            al.Add(ds.Tables[3]);
            return al;
        }
        #endregion

        #region 删除客户记录
        public string DeleteUserBaseInfo(string UserID)
        {
            string rst = SysmngDB.DeleteUserBaseInfo(UserID);
            return rst;
        }
        #endregion

        #region 查询角色列表
        [DataTableType("")]
        public DataTable GetRoleInfoList(string RoleName)
        {
            DataTable dt = SysmngDB.GetRoleInfoList(RoleName);
            return dt;
        }
        #endregion 

        #region 删除角色信息
        public string DeleteRoleBaseInfo(int RoleID)
        {
            string rst = SysmngDB.DeleteRoleBaseInfo(RoleID);
            return rst;
        }
        #endregion

        #region 编辑用户信息
        public string EditUserInfo(UserInfoItem userInfo)
        {
            string rst = SysmngDB.EditUserInfo(userInfo);
            return rst;
        }
        #endregion

        #region 编辑角色信息
        public string EditRoleInfo(RoleInfoItem roleInfo)
        {
            string rst = SysmngDB.EditRoleInfo(roleInfo);
            return rst;
        }
        #endregion

        #region 获取目录列表，用于加载角色分配目录树
        [DataTableType("")]
        public DataTable GetMenuList()
        {
            DataTable dt = SysmngDB.GetMenuList();
            return dt;
        }
        #endregion

        #region 获取角色基础信息，填充角色详情页面
        [DataTableType("")]
        public DataSet GetRoleBaseInfo(int RoleId)
        {
            DataSet ds = SysmngDB.GetRoleBaseInfo(RoleId);
            return ds;
        }
        #endregion

        #region 获取 手机系统_查询_日志信息
        [DataTableType("")]
        public ArrayList GetPhoneSysLogInfo(string beginTime, string endTime, int currentpage, int pageSize)
        {
            DataSet ds = SysmngDB.GetPhoneSysLogInfo(beginTime, endTime, currentpage, pageSize);
            ArrayList array = new ArrayList();

            if (ds != null && ds.Tables != null)
            {
                for (int i = 0; i < ds.Tables.Count; i++)
                {
                    array.Add(ds.Tables[i]);
                }
                return array;
            }
            return null;
        }
        #endregion

        #region 手机系统_统计_登录信息
        [DataTableType("")]
        public DataSet StatisticsPhoneSysLoginInfo()
        {
            DataSet ds = SysmngDB.StatisticsPhoneSysLoginInfo();
            return ds;
        }
        #endregion
         [DataTableType("")]
        public DataTable GetStatisInfoByUserName(string loginCode)
        {
            return SysmngDB.GetStatisInfoByUserName(loginCode);
        }
         [DataTableType("")]
        public DataTable GetStatisInfoByFuncName(string funcName)
        {
            return SysmngDB.GetStatisInfoByFuncName(funcName);
        }

        #region 查询_参数设置_界面
        [DataTableType("")]
        public DataSet GetSysParamInit()
        {
            return SysmngDB.GetSysParamInit();
        }
        #endregion

        #region 编辑系统参数设置信息
        public string SetSysParamInfo(SetParamItem SysParamItem)
        {
            string rst = SysmngDB.SetSysParamInfo(SysParamItem);
            return rst;
        }
        #endregion

        #region 查询_参数设置_片区列表
        [DataTableType("")]
        public DataTable GetSysParamPianQuInfo(string peopleId)
        {
            return SysmngDB.GetSysParamPianQuInfo(peopleId);
        }
        #endregion
    }
}
